package com.leorui.schoollife.entity.response

import net.sf.json.JSONObject
import java.io.Serializable

class CommonResponse : Serializable {
    private var status: Int? = null
    private var msg: String? = null
    private var what: Int? = null
    private var trueOrFalse: Boolean? = null

    constructor(mStatus: Int = 0, msg: String? = null, mTrueOrFalse: Boolean = false) : this(mStatus, msg, mTrueOrFalse, 0)
    constructor(mStatus: Int = 0, msg: String? = null, mTrueOrFalse: Boolean = false, mWhat: Int = 0) {
        this.status = mStatus
        this.msg = msg
        this.what = mWhat
        this.trueOrFalse = mTrueOrFalse
    }

    fun toMap(): Map<Any?, Any?> {
        val json = JSONObject()
        json["status"] = status
        json["msg"] = msg
        json["what"] = what
        json["trueOrFalse"] = trueOrFalse
        return json.toMap()
    }
}